{*include file="template/admin_head.htm"*}

<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">


            <div class="wrapper pr_8">
		{*if $cf_action=='add' || $cf_action=='edit'*}
    		<script type="text/javascript">
				$(function(){
					call_uploader('#cate_image_path_button','#cate_image_path','goodscate',{'show':'#cate_image_path_show'});
					{*if $row['cate_image_path']*}				
					$("#cate_image_path_show").append(show_photo_div("#cate_image_path_button","#cate_image_path","{*$row['cate_image_path']*}","admin",false));
					{*/if*}	
				});
				
				
				
				
			</script>	

                <div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">新增/修改商品分类</span>
                        <span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">商品分类管理</a></span></div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">

                        <form name="act_form" id="act_form" method="post" action="{*$cf_self_page*}">
                            <input name="id" id="id" type="hidden" value="{*$row['cate_id']*}" />
                            <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
				<tbody>
				</tbody>
				<tbody>
                	<tr>
					<td width="19%" align="right">父级:</td>
					<td width="81%" align="left">
                        {*html_options id=cate_pid name=cate_pid options=$cate_pid_ary  selected=$pid|default:'0'*}
                    </td>
				    </tr>
				    <tr>
					<td width="19%" align="right">分类名称:</td>
					<td width="81%" align="left">
                        <input type="text" id="cate_name" name="cate_name" size="50" value="{*$row['cate_name']*}"  />
                    </td>
				    </tr>
                    <tr>
						<td align="right">标识图片:</td>
						<td colspan="3" ><span id='cate_image_path_show'><img style="cursor:pointer" id="cate_image_path_button" src="/public/images/admin/upload.jpg" /></span>
							<input type="hidden" name="cate_image_path" id="cate_image_path" value="{*$row['cate_image_path']*}" /></td>
						
					</tr> 
					<tr>
					<td width="19%" align="right">排序:</td>
					<td width="81%" align="left">
                        <input type="text" size="5" id="cate_sort_num" name="cate_sort_num" value="{*$row['cate_sort_num']|default:'99'*}"  /> <span class="red">0是最前</span>
                    </td>
				    </tr>
				</tbody>
			    </table>
                          <div class="pt_8" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                &nbsp;&nbsp;
				<input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></div>
                        </form>
                    </div>
                </div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>

              


		    {*else*}

		    <script type="text/javascript">
		
			$(function(){
			    $("#search_form").submit(function(){
				/*if($("#skey").val()=='' ){
				    my_alert('请输入掌友名称','操作提示',"$('#skey').focus()");
				    return false;
				};*/
							
			    });

			})

		    </script>
		    <div class="pannel">
			<div class="pl"></div>
			<div class="pr"></div>
			<div class="pc1">
			    <form action="" method="get" id="search_form" name="search_form">
				<input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
				<div class="pt">
				    标题:
				   <input type="text" size="20" id="skey" name="skey" class="tet" value="{*$skey*}" />				   
				   <input type="image" src="public/images/admin/icon_search_btn.gif" />
				</div>
			    </form>
			</div>
		    </div>
		    <div class="content_panel_title">
			<div class="contentpanelleft"></div>
			<div class="contentpanelcenter">
			    <span class="contentpanelcenter_font">商品分类管理</span>
			    <span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">添加商品分类</a></span>&nbsp;
			</div>
			<div class="contentpanelrihgt"></div>
		    </div>
		    <div class="content_table_center_style">
			<div class="p8">
			    
			    <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
				<input name="act" type="hidden" value="all" />
				<input name="dpt" type="hidden" value="{*$cf_dpt*}" />
				<table width="100%" class="tbl tbl_nbr">
				    <thead>
					<tr class="thd">
					  <td width="8%" align="center" class="thr">序号</td>
					  <td width="8%" align="center" class="thr">ID</td>
					    <td width="9%" align="center" class="thr">一级分类</td>
					    <td width="13%" align="center" class="thr">二级分类</td>
					    <td width="22%" align="center" class="thr">标识图片</td>
					    <td colspan="3" align="center" class="thr">操作</td>
					</tr>
				    </thead>
				    <tbody>
					{*foreach $data_ary as $item*}
                    <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
					  <td align="center">{*$item['sort']*}</td>
					  <td align="center">{*$item['id']*}</td>
					    <td align="left">{*$item['title']*}</td>
					    <td align="left">&nbsp;</td>
					    <td align="center"><a href="{*$item['image']*}" target="_blank"><img height="50px" src="{*$item['image']*}"  /></a> </td>
					    <td width="13%" align="center"><a href="{*$cf_self_path*}-act_add_pid_{*$item['id']*}.htm?dpt={*$cf_dpt*}" class="edit">新增子分类</a></td>
					    <td width="11%" align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item['id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
					    <td width="16%" align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item['id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
					</tr> 
					{*if $item['child'] *}
                    	{*foreach $item['child'] as $item2*}
                        <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
                          <td align="center">{*$item2['sort']*}</td>
                          <td align="center">{*$item2['id']*}</td>
                            <td align="left"></td>
                            <td align="left">&nbsp;&nbsp;&nbsp;├ {*$item2['title']*}</td>
                            <td align="center"><a href="{*$item2['image']*}" target="_blank"><img height="50px" src="{*$item2['image']*}"  /></a> </td>
                            <td width="13%" align="center"></td>
                            <td width="11%" align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item2['id']*}_pid_{*$item['id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
                            <td width="16%" align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item2['id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
                        </tr>
                    	{*/foreach*} 					
					{*/if*}
					{*/foreach*}


					<tr class="tft">
					    <td colspan="11" style="padding:0;">
						<table width="100%" border="0">
						    <tr>
							<td align="center" style="border:0;padding:0;"><!--<input type="button" name="checkall" id="checkall" class="myinput" value="全 选" />-->
						      <!--<select name="alltype" id="alltype">
								<option selected="selected" value="">操作選擇</option>
							    </select>
							    &nbsp;<input type="submit" name="submit_all" id="submit_all" value="批量操作" class="myinput" />-->						      <div class="turnPage"><p>{*$page*}</p></div></td>
							</tr>
						</table>                                </td>
					</tr>
				    </tbody>
				</table>
			    </form>
			</div>
		    </div>
		    <div class="content_main_bottom">
			<div class="content_main_bottom_left"></div>
			<div class="content_main_bottom_right"></div>
		    </div>

		    {*/if*}
		</div>        </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}